# Chapter 15: Targeted Ads

Helix Universal Server can dynamically insert ads into streaming presentations. Offering integration with any HTML-based ad serving system, Helix Universal Server uses SMIL (Synchronized Multimedia Integration Language) to lay out ads and requested content in RealNetworks player software. This chapter explains how to set up Helix Universal Server's ad streaming features.

| For More Information: The ad chapter in RealSystem Production Guide Release 8 explains how to write SMIL-based presentations that include streaming ads.

# Understanding Ad Streaming

Helix Universal Server requires no special programming to integrate with popular ad serving systems. Ad servers are designed to place ad URLs in requested Web pages. To get ads from a third-party ad server, Helix Universal Server simply requests HTML containing the ad URLs from the ad server. That HTML may come directly from the ad server, or through a page hosted on a Web server.

When it receives the returned HTML, Helix Universal Server extracts the ad's file URL and hypertext link URL. It then inserts these URLs into the SMIL presentation requested by the client player. Through this method, any third- party ad server designed for HTML pages can serve ads to the RealNetworks SMIL-based player.

## Banner Ads

Helix Universal Server can deliver single banner ads and rotating banner ads for prerecorded content or live broadcasts. With rotating banner ads, Helix Universal Server sends RealNetworks player a new GIF, animated GIF, or JPEG ad at regular intervals throughout a presentation. To include ads with requested clips, content creators write a SMIL file that has one or more regions for ads. Instead of ad URLs, the SMIL file contains one or more`<RealAdInsert/>` tags that Helix Universal Server expands into unique ad URLs when the RealNetworks player requests the file. You can also use the SMIL generation feature, described below, to avoid writing SMIL by hand.

## Streaming Media Ads

Although Helix Universal Server can deliver standard banner ads, its power lies in its ability to stream ads in formats such as RealAudio, RealVideo, RealText and Flash. The delivery mechanism for streaming media ad URLs is the same as for static image ad URLs: the ad server places URLs in HTML requested by Helix Universal Server. The only difference is that these ad URLs are for RTSP- streamed clips on a Helix Universal Server host, rather than for HTTP- downloaded image files on an ad server.

## SMIL Generation

For ad layout, Helix Universal Server uses SMIL 1.0, which is compatible with RealPlayer G2 and later. Although you have more flexibility when writing your own SMIL files, Helix Universal Server's SMIL generation feature can automatically create or modify SMIL files that include ads. You can thereby stream ads without writing or modifying SMIL files by hand. This feature is useful if you have a large collection of existing clips or SMIL presentations for which you want to include ads. SMIL generation works for banner ads as well as lead-in ads.

# Quick Start for Testing Ad Banner Insertion

Helix Universal Server comes preconfigured for inserting banner ads into streaming presentations. Follow the steps below to see a sample streaming banner ad.

| To test banner ads using a RealNetworks Web server:

1. Start Helix Universal Server.

2. Start the RealNetworks player and choose File>Open Location.

3. Enter the following URL, substituting the actual name of your Helix Universal Server for `yourserver.com`, and Helix Universal Server's RTSP port for `554`:

    rtsp://yourserver.com:554/adtag/general/smilgen/banner/real9video.rm

Requesting this URL verifies that ad streaming works by playing the `real9video.rm` clip included with Helix Universal Server. The `/smilgen/banner/` mount point in the URL causes Helix Universal Server to generate a SMIL file that defines a banner ad region and a video region. The `/adtag/general/` mount point is preconfigured to pull a banner ad from a RealNetworks Web server.

## Testing Your Own Banner Ads

You can quickly modify Helix Universal Server to pull ads from your ad serving system instead of the RealNetworks Web server. Just point Helix Universal Server to a Web page that provides the ad URLs.

| To test banner ads using your own Web server:

1. Choose the Web page where Helix Universal Server gets ads. For testing purposes, you can use any page on your Web site that includes a 468-pixel by 60-pixel top banner ad in GIF or JPEG format.

2. Click Advertising>Ad Serving. This displays a dialog for configuring Helix Universal Server to work with your ad serving system.

3. Highlight `/adtag/general/`.

4. In the Target HTML field, change the default value of http://www.real.com/ads/g2ads_def.html to the fully qualified URL of the Web page where Helix Universal Server gets ad URLs.

5. Click Apply.

6. Restart Helix Universal Server by clicking the Restart icon at the top of the Administrator.

7. Open the previous RTSP URL in the RealNetworks player. This plays the same video, but with a banner ad pulled from the Target HTML URL, rather than from a RealNetworks server.

# General Steps for Setting Up Ad Streaming

| Follow these steps to set up ad streaming:

1. Integrate Helix Universal Server with your ad serving system.

To retrieve ad URLs, Helix Universal Server can integrate directly with many ad serving systems. It can also request an HTML page on a Web server to get ad URLs. For more on these two methods, refer to "Getting Ad URLs from an Ad Server".

2. Create ad streaming mount points.

These mount points, which determine what type of ad Helix Universal Server streams, appear in URLs for requested content. "Configuring Helix Universal Server to Stream Ads" tells how to set up the mount points and configure ad streaming features.

3. Set up automatic SMIL generation mount points (optional).

If you have a lot of existing content for which you want to include ads, this optional feature can save you much time and effort. See "Generating SMIL Files for Ads" for more information.

4. Communicate ad streaming features to content creators.

Content creators refer to the ad chapter in RealSystem Production Guide Release 8 for instructions on creating SMIL files with `<RealAdInsert/>` tags. They rely on you for information about Helix Universal Server's specific ad streaming features, however. You need to communicate the following to content creators:

- whether automatic SMIL generation is in use

- the ad formats available, such as GIF, animated GIF, RealVideo, or Flash

- the width and height of available ads

- the mount points to include in URLs used to request streaming presentations

- the allowable mount point override options

| Note: Override options are described in "Overriding Mount Point Settings through SMIL".

# Getting Ad URLs from an Ad Server

To stream an ad, Helix Universal Server gets the URL to the ad clip (whether a static image or a streaming clip such as video) from an ad serving system. You can integrate Helix Universal Server directly with many popular ad servers. Or Helix Universal Server can get ad URLs through a Web server integrated with an ad server. Both options are described below. The location Helix Universal Server accesses to get ad URLs is its target URL. Each target URL returns URLs (both the file URL and the clickthrough URL) for a specific type of ad.

## Understanding Ad Types

The types of ads Helix Universal Server streams relate directly to the target URLs. To stream just one type of ad, you need just one target URL where Helix Universal Server gets all ad URLs. If you plan to stream different types of ads, such as image banner ads and streaming video clips, though, you need target URLs for each ad type. Several things determine the "ad type":

- ad file format

A GIF or animated GIF image has a different file format than a streaming video clip. If you host both GIF and RealVideo ads, for example, you'll need at least two target URLs, one for each file format.

- ad file size

For some presentations, you might insert full-size banner ads (468 pixels by 60 pixels). For others, you may include half-size banner ads (234 pixels by 60 pixels). You need to set up a different target URL for each ad size. Similarly, you'll need a different target URL for each size of RealVideo ad you stream.

- ad audience

You may want to use different ads based on the subjects of your streaming presentations. Streaming sports clips may have different advertisers than streaming news stories, for example. You can use different target URLs when ads are the same size and formats, but reach different audiences.

- ad serving system

Helix Universal Server can integrate with several ad streaming systems. Each system may work differently, however. Suppose you stream just standard banner ads, but pull the ads from two different ad serving systems. You'll need two different target URLs, one for each system, even if the ads have the same format, size, and audience.

Combinations of file format, file size, audience, and ad serving system make up the types of ads Helix Universal Server gets from target URLs. As "Understanding Ad Streaming Mount Points" explains, the number of target URLs you use determines how many ad streaming mount points you set up.

## Guidelines for Ads in Streaming Presentations

The following points and guidelines apply to ad files and ad URLs used in streaming Helix Universal Server presentations:

- A banner ad must be a GIF, animated GIF, or JPEG image. the RealNetworks player cannot display ads that are HTML tables, Java applets, and so on.

- Ad clickthrough URLs are thrown to the viewer's browser, unless the URL is a SMIL hyperlink URL that targets the RealNetworks player.

- For rotating banner ads, Helix Universal Server requests the target URL at regular intervals throughout the presentation as defined by the ad mount point. Each time it requests the target URL, the ad serving system returns a URL to a different banner ad.

- For single banner ads or streaming media ads, Helix Universal Server requests the target URL for each `<RealAdInsert/>` tag in the SMIL file. If the file has two `<RealAdInsert/>` tags, for example, Helix Universal Server requests the target URL twice and uses the ad URL returned with the first request for the first `<RealAdInsert/>` tag, the URL returned with the second request for the second tag.

- the RealNetworks player supports cookies just like a Web browser. If the Web server hosting the ad target page attempts to set a Web browser cookie through an HTTP response header, Helix Universal Server intercepts the cookie and writes it to the RealNetworks player. When the RealNetworks player requests content that includes an ad, Helix Universal Server requests from the user's Web browser any cookies for the target Web server's domain and path, forwarding these to the Web server.

| Note: the RealNetworks player users can disable cookie support in their the RealNetworks player preferences.

- You can modify your ad server to produce RTSP-based URLs to streaming media ads in RealAudio, RealVideo, and Flash formats. For more information, the ad chapter in RealSystem Production Guide Release 8 explains how to use the `<RealAdInsert/>` tag in SMIL files.

## Integrating Helix Universal Server Directly with an Ad Server

Helix Universal Server works with a number of popular ad serving systems. To integrate Helix Universal Server with the ad serving system you're using, see this document:

http://docs.real.com/docs/adapp.pdf

This document explains how to get ad URLs through HTML generated directly by different ad serving systems. Typically you do this through a target URL that causes the ad server to return the ad URLs you want. You then tie this target URL to a Helix Universal Server mount point, as described in "Creating Ad Streaming Mount Points".

Integration information is given in this separate document, rather than this manual, so that RealNetworks can provide you with the latest information. To read this document, which is in Adobe's Portable Document Format (PDF), use the free Acrobat Reader, available here:

http://www.adobe.com/products/acrobat/readstep.html

If the integration document does not cover the ad server you're using, you can set up a target HTML page on a Web server.

## Setting up a Target HTML Page on a Web Server

Integrating Helix Universal Server directly with your ad serving system is the preferred method for getting ad URLs. However, Helix Universal Server can also retrieve ad URLs by requesting an HTML page integrated with an ad serving system. This target page may be an existing Web page on your site, or a page specifically set up to provide Helix Universal Server with ad URLs. By using this page as an intermediary for exchanging ad URLs, Helix Universal Server can work with virtually any ad serving system.

You set up your HTML target page as required by your ad serving system. For example, some systems require a page to have a server-side `#include` tag that expands into ad URLs when the page is served. When Helix Universal Server requests the page, the returned page should have mark-up that includes an `<img src=...>` tag for the ad file, as well as a clickthrough hypertext link, similar to this:

    <a href="http://www.real.com">
    <img src="http://images.real.com/ads/adsalesrg.gif">
    </a>

Helix Universal Server then replaces the requested SMIL file's `<RealAdInsert/>` tag with these URLs.

| Note: Refer to your ad serving system's documentation for information on how to insert ad URLs into the target HTML page each time it is requested.

### Guidelines for Creating a Target HTML Page

In addition to the general points listed in "Guidelines for Ads in Streaming Presentations", the following points apply when you get ad URLs through an HTML page hosted on a Web server:

- You can designate the ad to use by including the variable `realad="1"` in the image source tag. The `realad` value `"1"` is a syntax requirement that simply tells Helix Universal Server which image to use. Using the `realad` variable requires you to configure the ad server to include the variable in the returned HTML. Here is an example:

    <img src="http://www.real.com/ads/nbcconan.gif" border=0 alt="Win a Great Spring Break!" realad="1">

- If no `realad="1"` value is present, Helix Universal Server uses the first `<img src=...>` tag in the HTML file as the ad source.

| Warning! If other hyperlinked images precede the desired ad image, Helix Universal Server may not be able to distinguish the correct URL to extract.

- To minimize ad streaming latency, keep the target HTML page as small as possible, serve the page from a Web server that has fast response, and ensure that the network connection between the machines is fast.

## Requesting SMIL Files from an Ad Server

As described above, the target URL typically returns ad URLs that Helix Universal Server incorporates into the requested SMIL file. However, the ad server can also return a full presentation SMIL file. To set this up, you modify your ad server to generate SMIL mark-up, including a layout, ad URLs, requested clip URLs, and any other SMIL attributes. The returned SMIL file must start with `<smil>` and end with `</smil>` as shown here:

    <smil>
      <body>
        ...all SMIL mark-up...
      </body>
    </smil>

Helix Universal Server recognizes that the ad server has returned SMIL mark- up rather than simple ad URLs. Instead of streaming the SMIL file the RealNetworks player originally requested, Helix Universal Server streams the returned SMIL mark-up in full. The requested SMIL file just needs to be a shell for a `<RealAdInsert/>` tag:

    <smil>
      <RealAdInsert/>
    </smil>

The following table illustrates the basic steps involved in generating a SMIL file by an ad server. If you integrate Helix Universal Server directly with an ad server, you don't use an HTML target file as shown in column 2. Rather, the target URL causes the ad server to return the mark-up shown in column 3. Some syntax details have been omitted for clarity.

Generating SMIL Presentations with an Ad Server
SMIL File Requested by Viewer | HTML Target File Used to Expand <RealAdInsert/> | File Returned from Ad Server | SMIL File Delivered to Viewer
--- | --- | --- | ---
`<smil> ` `<RealAdInsert/> ``</smil>` | `<HTML> ``... <!--#include...--> ... ``</HTML>` | `<smil> <body> ` `...mark-up..``. </body> </smil>` | `<smil> <body> ` `...mark-up... ``</body> </smil>`
The requested file is a shell for `<RealAdInsert/>`. | The request URL points Helix Universal Server directly to an ad server, or, as shown above, to an HTML page integrated with an ad server. | The ad server returns a full SMIL file that contains mark-up for a streaming presentation. | Helix Universal Server streams the SMIL file returned by the ad server to the RealNetworks player.

# Configuring Helix Universal Server to Stream Ads

Helix Universal Server can insert a banner ad, rotating banner ad, or streaming ad clip into a requested SMIL file. Content creators lay out the presentation with SMIL, but instead of including URLs to ad clips, they add `<RealAdInsert/>` tags that cause Helix Universal Server to get ads from an ad server. The URL for the SMIL file request determines what type of ad Helix Universal Server inserts in place of a `<RealAdInsert/>` tag.

## Understanding Ad Streaming Mount Points

Once you've determined how many ad types you need to stream, you can plan the mount points you'll need. ("Understanding Ad Types" explains how various factors make up an "ad type.") Each mount point gives Helix Universal Server a different target URL where it finds the ad URLs. If one type of ad, such as a GIF banner ad, works for all content you stream, set up just one ad streaming mount point, such as `/adtag/general/`. You'll probably need to set up several mount points, however.

Once you've set up the mount points, the ad used to replace a `<RealAdInsert/>` tag depends on the URL used to request the SMIL file. Here's an example of a SMIL request URL:

    <a href="http://helixserver.example.com:HTTPport/ramgen/adtag/general/start.smil">

The target URL defined for the `/adtag/general/` mount point determines what type of ad replaces the SMIL file's `<RealAdInsert/>` tag or tags. `<RealAdInsert/>` tags may have parameters that override the settings, though. Additional mount points not related to ad streaming, such as a mount point to verify a user name and password, may precede an ad streaming mount point in the SMIL file request URL:

    <a href="http://helixserver.example.com:HTTPport/ramgen/secure/adtag/general/start.smil">

To stream more than one type of ad, you define additional mount points like these:

    /adtag/sports/
    /adtag/tech/

These mount points appear in different request URLs that target different types of ads:

    <a href="http://helixserver.example.com:HTTPport/ramgen/adtag/sports/start.smil">
    <a href="http://helixserver.example.com:HTTPport/ramgen/adtag/tech/start.smil">

| Tip: Although you can create a new mount point for every ad type you stream, you do not always have to do this. In some cases, it is easier to use SMIL to override a mount point's settings, rather than create a new mount point. Before you set up mount points, read "Overriding Mount Point Settings through SMIL".

### Choosing the Ad Streaming Base Mount Point

Ad streaming mount points like `/adtag/general/` constitute "virtual paths" that invoke Helix Universal Server's ad streaming feature. The base mount point represents the actual file system mount point Helix Universal Server uses to find the requested file. When you define an ad streaming mount point, you also indicate its base mount point. For example, this entry for a base mount point:

    /

means Helix Universal Server uses the file system plug-in associated with the mount point "`/`" to locate the requested file. The value "`/`" typically indicates Helix Universal Server's default file system plug-in that locates unsecured files on local disks. So for this request:

    <a href="http://helixserver.example.com:HTTPport/ramgen/adtag/general/start.smil">

Helix Universal Server locates the file with a UNIX path such as the following, depending on the directory path associated with the "`/`" mount point:

    /usr/local/Real/HelixServer/content/start.smil

On Windows, the path may look like this:

    C:\Program Files\Real\Helix Server\content\start.smil

### Using Authentication with Ad Streaming

If Helix Universal Server contains secure content, authorization is verified only on the initial request URL, not when Helix Universal Server accesses the file through the base mount point. This creates a security risk if ad streaming requests are unsecured, but secure content resides below the directory defined by the base mount point. If your Helix Universal Server hosts secure content, but ad streaming requests are unsecured, make sure the ad streaming base mount point does not lead to a secured directory.

#### Security Risk Example

To illustrate how a security hole can occur, suppose the ad streaming mount point uses a base mount point of "`/`", which is defined in the Helix Administrator's Mount Points section as this path:

    .../content/

If this path leads to a secured directory such as:

    .../content/protected/

someone can access content in this directory through the ad streaming system by using a URL such as this:

    <a href="http://helixserver.example.com:HTTPport/ramgen/adtag/general/protected/start.smil">

This URL uses the Ramgen (`/ramgen/`) and ad streaming (`/adtag/general/`) mount points, but no security mount point. Here, `/protected/` is not a mount point, but the directory below the base mount point directory. Because the URL has no security mount point, Helix Universal Server does not validate the request before accessing the file in this path:

    .../content/protected/start.smil

To prevent security problems, keep unsecured and secured content in separate paths. For example, you might use these mount points for unsecured and secure content:

    /
    /secured/

These mount points might lead, respectively, to these paths on UNIX:

    /usr/local/Real/HelixServer/content
    /usr/local/Real/HelixServer/secure

or these paths on Windows:

    C:\Program Files\Real\Helix Server\Content
    C:\Program Files\Real\Helix Server\Secure

A security risk is not present because the unsecured directory path does not lead to the secured directory path. For information on secure directories and authenticated content, refer to Chapter 13, "Authentication".

## Creating Ad Streaming Mount Points

The mount point `/adtag/general/` is predefined. You can modify this mount point, as well as create new mount points.

| To create a new ad streaming mount point:

1. Click Advertising>Ad Serving.

2. Click the "+" icon. This creates a new mount point with a predefined name.

3. In the Edit Mount Point box, change the new mount point name to any name you prefer. This mount point, which will appear in request URLs, should have a format similar to this:

    /adtag/tech/

| Tip: Ad streaming mount points can use names such as `/generalads/`, `/sportsads/`, and `/techads/`. But names like `/adtag/general/`, `/adtag/sports/`, and `/adtag/tech/` help Helix Universal Server to run more efficiently, and make it easier to recognize ad mount points based on the consistent presence of `/adtag/`. For more information on ad streaming mount points, see "Understanding Ad Streaming Mount Points".

| To define an ad streaming mount point:

1. Click Advertising>Ad Serving.

2. Select a mount point in Ad Mount Points window.

3. For Description, type any phrase that describes the ad mount point. You might use "Sports Ads" or "Tech Ads," for example.

4. In the Base Mount Point field, specify the mount point where Helix Universal Server locates the requested file. For unsecured content, this is typically the mount point "`/`".

| For More Information: See "Choosing the Ad Streaming Base Mount Point" for more information.

5. For Target HTML, enter a fully-qualified target URL where Helix Universal Server finds the ad URL to use. Each ad mount point typically has a unique URL through which it directly integrates with an ad serving system, or requests a Web-based HTML page containing ad URLs. After you click Apply to update Helix Universal Server, Test URL links your browser to the given URL. For more information, see "Getting Ad URLs from an Ad Server". See also "Overriding Mount Point Settings through SMIL" for details on overriding where Helix Universal Server gets ad URLs.

6. The Ad Server Type pull-down list lets you select the type of system that supplies the ad URLs. Your Helix Universal Server offers the following, and possibly more, choices:

- Default

- Type 1

- Type 2

- DoubleClick

- NetGravity

- Engage

- AdForce

The Ad Server Type setting affects the clickthrough URL of an ad that appears in the RealNetworks player. If you use the DoubleClick ad serving system, for example, choose the DoubleClick option. When you choose one of the named ad serving systems, make sure you have integrated Helix Universal Server with that system as described in "Integrating Helix Universal Server Directly with an Ad Server".

If you do not use one of the named ad serving systems, choose the Default setting and finish configuring the mount point as described in this section. Apply the changes, and use the RealNetworks player to request ad content through the mount point. Click the ad to verify that it takes you to the correct Web page for the ad sponsor. If the clickthrough does not work, choose Type 1, apply the changes, and try again. If that doesn't work, redo the procedure using Type 2. Once clickthroughs work, choose the same type setting for all mount points used with that ad serving system. For more information on this option, see "Why are There Different Ad Server Types?".

7. Most users should leave Resolve Relative URLs set to Yes. In this case, Helix Universal Server resolves any relative ad URLs, sending fully qualified URLs to the RealNetworks player. This prevents the RealNetworks player from mistakenly requesting content from the wrong server. This setting does not affect fully qualified URLs returned to Helix Universal Server.

Set Resolve Relative URLs to No only if your Helix Universal Server hosts the content specified by relative ad URLs. For example, your Helix Universal Server might host the GIFs used for rotating banner ads. The ad serving system can then return relative URLs that Helix Universal Server sends to the RealNetworks player. In this case, Helix Universal Server doesn't need to resolve the relative URLs because it hosts the content.

8. Enter information in the Rotating Banner Ads section if you want to set up rotating banner ads. The section "Setting Up Rotating Banner Ads"explains these fields in detail.

9. Click Apply to update Helix Universal Server with the new mount point information.

10. Put the changes into effect by clicking the Restart icon at the top of Helix Administrator.

### Why are There Different Ad Server Types?

For the Ad Server Type field, Helix Universal Server presents several name- brand ad serving systems, as well as the three generic options: Default, Type1, and Type 2. These options are present because different ad serving systems handle clickthrough URLs differently. Some ad serving systems return the advertiser's clickthrough URL with the ad image URL. For example, a clickthrough URL http://www.real.com may accompany a RealNetworks ad.

Other ad servers do not return the advertiser's clickthrough URL initially, however. Instead, they record Helix Universal Server's IP address and a user agent ID when it requests an ad. Rather than pointing to the advertiser's Web site, the clickthrough URL points back to the ad server and includes Helix Universal Server's IP address and ID. This type of URL lets the ad server log the clickthrough before redirecting the request to the advertiser's Web site.

In this case, an error may occur on the ad server because the RealNetworks player handles clickthroughs rather than Helix Universal Server. the RealNetworks player's IP address will not match Helix Universal Server's IP address, so the ad server will not recognize the RealNetworks player as the client that received the ad. To correct this, the RealNetworks player routes the clickthrough request through Helix Universal Server. Because Helix Universal Server then acts as the RealNetworks player's proxy, the ad server recognizes the clickthrough attempt.

The settings Default, Type 1, and Type 2 cover three possible ways that Helix Universal Server can interact with ad servers. It is easier to try out the three possibilities until you find that option that makes clickthroughs work correctly than to research how your ad serving system handles clickthroughs.

## Setting Up Rotating Banner Ads

When you set up a mount point to stream banner ads in JPEG or GIF format, you can use Helix Universal Server's rotation feature to insert fresh ads into the SMIL presentation at regular intervals. You might stream a new ad image to the RealNetworks player every 30 seconds, for example. The following are the options you set in the Rotating Banner Ads section of the ad streaming mount point dialog. For more on SMIL generation, see "Generating SMIL Files for Ads".

### Rotate

Select On in this pull-down list to turn on banner ad rotation for the mount point.

### Interval

This is the frequency in seconds that new banner ads appear in the RealNetworks player. Make sure that the interval and the bit rate work for the ad size. With a bit rate of `1000` and an interval of `30`, for example, Helix Universal Server can stream 30,000 bits (3.6 Kilobytes) during each 30-second interval. This may not be enough for some banner ads.

### Bitrate

Helix Universal Server streams banner ads to the RealNetworks player at this rate, which is in bits per second (bps). Keep in mind that the ad bit rate is part of the presentation's overall bit rate. If you want to deliver a 20 Kbps video over 28.8 Kbps modems, for example, do not use a 4000 bps ad stream. The total presentation bit rate of 24 Kbps is too high when you take into account the overhead reserved for network congestion, packet loss, and so on.

The following table lists some common interval times and banner ad sizes, showing the minimum bit rate required for each combination. For instance, the table shows that 9-Kilobyte ads rotated every 30 seconds need to stream at a minimum of 2460 bits per second.

Minimum Ad Bit Rate Needed for Specific Intervals and Ad Sizes
Interval | Bit Rate for 6-Kilobyte Ads | Bit Rate for 9-Kilobyte Ads | Bit Rate for 12-Kilobyte Ads | Bit Rate for 18-Kilobyte Ads
--- | --- | --- | --- | ---
15 | 3280 | 4920 | 6560 | 9840
30 | 1640 | 2460 | 3280 | 4920
45 | 1100 | 1640 | 2200 | 3280
60 | 820 | 1230 | 1640 | 2460
90 | 550 | 820 | 1100 | 1640
120 | 410 | 620 | 820 | 1240

| Note: The bandwidth chapter in RealSystem Production Guide Release 8 explains how to target various connection speeds.

### Startup Image

In this optional field, you can enter the location of an image to display before the first ad streams to the RealNetworks player. The purpose is simply to fill the ad banner region until the first ad appears in the RealNetworks player. If you don't use a start-up image, the ad region remains blank until the first ad arrives. The start-up image streams at the same bit rate you select for the rotating ads. Do the following to make the start-up image appear as quickly as possible:

- Keep the start-up image as small as possible. The image should be a small, non-animated GIF or JPEG.

- Stream the start-up image from Helix Universal Server rather than another server. Although not required, this minimizes delays caused by connection latency. If a start-up image named `start.gif` is in Helix Universal Server's main content directory, for example, enter this for StartUp Image:

    /start.gif

# Changing Timeout Values

Helix Universal Server uses two timeout values, each set by default to 5 seconds:

- Connection Timeout

This value determines the number of seconds that Helix Universal Server waits for a response from an ad serving system or a Web server when requesting ad URLs.

- Server Timeout

This value determines the number of seconds that Helix Universal Server waits for the ad server or Web server to return the ad URLs after the connection is made.

All timeouts are recorded in the Helix Universal Server error log. (The error log is described in "Error Log".) If ads consistently fail to appear in the RealNetworks player, the server providing the ad URLs may not be responding fast enough to avoid a timeout. You should first try to fix this latency by using a faster Web or ad server, or increasing the speed of the connection between Helix Universal Server and the other server. If ad retrieval still times out, increase the two timeout values by increments of one second until ad retrieval consistently works. Consider the following points when raising the timeout values:

- The higher the timeout value, the longer Helix Universal Server waits for a response and, correspondingly, delays the presentation. You need to balance the requirements for retrieving ads against viewers' expectations that presentations play back with minimal delay.

- In its preferences, each the RealNetworks player has a connection and a server timeout period set by default to 20 and 90 seconds, respectively. These values determine how long the RealNetworks player waits for Helix Universal Server to respond to its requests. Your Helix Universal Server timeout values should always be below these values. Each the RealNetworks player user can change these values, so some users may have set the values lower.

| To change the Helix Universal Server timeouts:

1. Click Advertising>Ad Timeouts.

2. Change the value in the Connection Timeout or Server Timeout field, or both. Do not set a value lower than the default of 5. Do not set a value higher than necessary to ensure that ad retrieval works consistently.

3. Click Apply to update Helix Universal Server with the new timeout information.

4. Put the changes into effect by clicking the Restart icon at the top of Helix Administrator.

# Overriding Mount Point Settings through SMIL

Helix Universal Server lets content creators override certain ad mount point settings. Through SMIL, content creators can specify banner ad rotation parameters, as well as where Helix Universal Server gets ad URLs. If your Helix Universal Server hosts clips for many content creators who use different ad types, this override feature lets you satisfy the creators' different needs without setting up separate ad streaming mount points for each ad type. For example, instead of setting up different banner ad mount points for different audiences, you can set up one mount point, then use SMIL to point Helix Universal Server to different target URLs. Each target URL then returns ad URLs for a different audience.

## Overriding the Target URL Location

As described in "Creating Ad Streaming Mount Points", you specify where Helix Universal Server gets ad URLs when you define each ad streaming mount point. Helix Universal Server then requests an ad URL for each `<RealAdInsert/>` tag included in the SMIL file. Content creators can specify a different target that provides ad URLs, however, by including an `AdURL` attribute in the `<RealAdInsert/>` tag:

    <RealAdInsert region="adbanner" AdURL="http://www.example.com/ads.html"/>

In this case, Helix Universal Server requests the URL specified by the `AdURL` attribute, not the target defined through Target HTML in the mount point dialog. Keep in mind, though, that the `AdURL` target must provide ad URLs that work with the mount point's remaining settings. For example, the `AdURL` target should not return URLs to streaming video ads if the mount point is set up for rotating banner ads. Nor should it target an ad serving system other than the one defined for the mount point.

## Overriding Banner Rotation Settings

"Setting Up Rotating Banner Ads" explains how to configure an ad streaming mount point for rotating banner ads. To include these ads in a SMIL presentation, content creators use a `<RealAdInsert/>` tag like this:

    <RealAdInsert region="ad_banner" dur="9min"/>

This tag specifies the SMIL region where the ads appear and how long Helix Universal Server sends ads to the RealNetworks player. Normally, the tag does not specify any ad rotation parameters, which are set instead in the ad streaming mount point. As described above, however, content creators can specify where Helix Universal Server gets the banner ad URLs. As well, content creators can override any of the banner ad mount point's Interval, Bitrate, and Startup Image settings:

    <RealAdInsert region="ad_banner" dur="9min" Interval="60" Bitrate="2460"
    StartupImage="/start.gif" AdURL="http://www.example.com/ads.html"/>

This sample tag overrides the ad mount point's rotation settings with a new ad target URL, a new start-up image, a rotation interval of 60 seconds, and a bit rate of 2,460 bits per second.

# Generating SMIL Files for Ads

Helix Universal Server can automatically generate a SMIL file that inserts an ad or series of ads in each streaming presentation. This works for both single clips and existing SMIL files. If your Helix Universal Server hosts a large number of RealAudio clips, for example, you can simply have Helix Universal Server generate a SMIL file that lays out ads for each clip. Content creators then do not need to write SMIL files or include `<RealAdInsert/>` tags in existing SMIL files.

| Note: Automatic SMIL generation works in conjunction with ad streaming as described in "Configuring Helix Universal Server to Stream Ads", and you must set up ad streaming mount points first.

## Limitations on Automatic SMIL Generation

Although automatic SMIL generation works in a large number of ad streaming scenarios, it does not provide all the flexibility possible when content creators write SMIL files that include `<RealAdInsert/>` tags. SMIL generation has these limitation:

- Each requested clip or SMIL file can include only one ad. You can have a rotating banner ad that refreshes every 30 seconds, for example, but you cannot have two banner ads.

- Interstitial ("commercial break") ads are not supported.

- With rotating banner ads, Helix Universal Server assumes the generated SMIL file is for a live broadcast, and it disables the RealNetworks player's clip position slider. For more on this, see the section on rotating banner ad durations in the ad chapter of RealSystem Production Guide Release 8.

- Content creators cannot change ad streaming mount point parameters as described in "Overriding Mount Point Settings through SMIL".

## Understanding SMIL Generation Mount Points

Like ad streaming, automatic SMIL generation works through mount points included in the content request URL. The SMIL generation mount points always work in tandem with ad streaming mount points, which are described in "Understanding Ad Streaming Mount Points". For example, a Web page hyperlink to a media clip or SMIL file on Helix Universal Server may look like this:

    <a href="http://helixserver.example.com:HTTPport/ramgen/adtag/general/smilgen/banner/video/video.rm">

Here, the ad streaming mount point, `/adtag/general/`, determines the type of ad used with `video.rm`. The SMIL generation mount point, `/smilgen/banner/`, trails the ad streaming mount point in the URL. It causes Helix Universal Server to create a SMIL file that lays out a `<RealAdInsert/>` tag along with the video clip. If a SMIL file rather than a clip were requested, Helix Universal Server would create a new SMIL file that includes the contents of the requested SMIL file along with a `<RealAdInsert/>` tag.

A mount point such as `/smilgen/banner/` might define a layout for a banner ad that is 468 pixels wide by 60 pixels high and appears above the requested content. You can define any number of SMIL generation mount points, such as `/smilgen/lead_in/` or `/smilgen/banner_below/`, for different ad layouts. This lets you support any number of ad types, whether banner ads or streaming media ads, through SMIL generation.

When you define a SMIL generation mount point, it must be relative to the base mount point of the ad streaming mount point used with it. For example, in this request URL:

    <a href="http://helixserver.example.com:HTTPport/ramgen/adtag/general/smilgen/banner/video/video.rm">

`/adtag/general/` is the ad streaming mount point. If this mount point uses the default file streaming mount point ("`/`") as its base mount point, you simply define the SMIL generation mount point like this:

    /smilgen/banner/

If the ad streaming mount point uses a base mount point such as `/local/`, however, you need to include this base mount point in the SMIL generation mount point definition:

    /local/smilgen/banner/

This causes the SMIL generation feature to intercept the file access attempt caused by the ad streaming mount point. The actual file access then occurs through the SMIL generation mount point's base mount point. Note that in the example above, `/local/` does not appear in the request URL. It appears only in the SMIL generation mount point dialog. For more on the ad streaming base mount points, see "Choosing the Ad Streaming Base Mount Point".

## Creating SMIL Generation Mount Points

SMIL generation mount points for lead-in ads, banner ads, and rotating banner ads are predefined. You can modify these mount points or create new ones.

| To create a SMIL generation mount point:

1. Click Advertising>Ad SMIL Generator.

2. Click the "+" icon. This creates a new mount point with a predefined name.

3. In the Edit Mount Point field, change the new mount point name to any name you prefer. This mount point, which will appear in request URLs, should have a format similar to this:

    /smilgen/banner_above/

| Tip: SMIL generation mount points can use names such as `/smil_lead/` and `/smil_banner/`. But names like `/smilgen/lead_in/` and `/smilgen/banner_below/` help Helix Universal Server to run more efficiently, and make it easier to recognize mount points based on the consistent presence of `/smilgen/`. Remember that SMIL generation mount points are relative to ad streaming base mount points. See "Understanding SMIL Generation Mount Points".

| To edit a SMIL generation mount point:

1. Highlight the mount point in the SMIL Mount Points window.

2. For Description, enter a phrase that describes the ad mount point. You might use "Bottom Banner SMIL Generation" or "Lead-in Video SMIL Generation," for example.

3. In the Base Mount Point field, enter the mount point where Helix Universal Server locates the requested file. For unsecured content, this is typically the mount point "`/`".

| Note: SMIL generation base mount points have the same security issues related to the base mount points for ad streaming. See "Using Authentication with Ad Streaming" for more information.

4. Fill in the options for SMIL generation in the remainder of the dialog. See "Setting SMIL Options" for descriptions of these options.

5. Click Apply to update Helix Universal Server with the new mount point configuration.

6. Put the changes into effect by clicking the Restart icon at the top of Helix Administrator.

## Setting SMIL Options

The following are the SMIL generation options you can set for each mount point.

#### Ad Type

This pull-down list determines the type of ad used. You can set one of these values:

`Banner` | Banner ad that appears alongside requested content. For Ad Position, choose `Top`, `Bottom`, `Left`, or `Right`.
`Leadin` | Ad that appears before the requested content begins playback. This ad is usually in a format such as RealVideo or Flash. The Ad Position valueis typically `Center`.
Rotating Banner | Rotating banner ad that appears alongside requested content. The Ad Position value should be `Top`, `Bottom`, `Left`, or `Right`.

#### Ad Position

This pull-down list determines the ad's location relative to the requested content. It can have one of the following values:

`Top` | Ad appears above the requested content. The ad and content are centered horizontally within the RealNetworks player window.
`Bottom` | Ad appears below the requested content. The ad and content are centered horizontally within the RealNetworks player window.
`Center` | Ad appears centered and in front of the requested content. The ad and content are thus centered both horizontally and vertically. In this case, the Ad Type value should be `Leadin`. Otherwise the ad appears in front of the content as the content plays.
`Left` | Ad appears to the left of the requested content. The ad and content are centered vertically within the RealNetworks player window.
`Right` | Ad appears to the right of the requested content. The ad and content are centered vertically within the RealNetworks player window.

### Ad Width and Ad Height

In these fields, set the pixel width and height, respectively, of the ad included with the request. Helix Universal Server uses these values to lay out the ad in the SMIL file. Make sure that the ad serving system returns URLs to ads of this size. For more information, see "Getting Ad URLs from an Ad Server".

### Inner Padding and Outer Padding

The outer padding determines how many pixels of space Helix Universal Server adds as a border around all clips. A value of `20`, for example, adds 20 pixels of outer padding. The inner padding sets the distance in pixels between the ad and the requested content. It is ignored if the ad is centered in front of the requested content.

Suppose a banner ad appears above the content and is wider than the content. If the ad is 468 pixels wide, an outer padding value of 5 makes the RealPlayer window 478 pixels wide. The height of this window is:

- the height of the ad

- plus the height of the content (height of clip or SMIL file `root-layout`)

- plus the `InnerPadding` value

- plus 10 pixels (5 pixels of outer padding at top and bottom)

### Background Color

This field sets the background color for the RealNetworks player window. Empty space around the ad and content appears in this color. To specify a color value, use any RGB hexadecimal value (`#RRGGBB`), or one of the following predefined color names, listed here with their corresponding hexadecimal values:

`white (#FFFFFF)` | `silver (#C0C0C0)` | `gray (#808080)` | `black (#000000)`
`yellow (#FFFF00)` | `fuchsia (#FF00FF)` | `red (#FF0000)` | `maroon (#800000)`
`lime (#00FF00)` | `olive (#808000)` | `green (#008000)` | `purple (#800080)`
`aqua (#00FFFF)` | `teal (#008080)` | `blue (#0000FF)` | `navy (#000080)`

### Enable Playlist

This field determines whether the viewer has access to the RealNetworks player playlist during a lead-in ad. It does not affect banner ads. Set this field to `Yes` to allow the viewer to skip the lead-in ad clip.

| © 2002 RealNetworks, Inc. All rights reserved. For more information, visit RealNetworks Click here if the Table of Contents frame is not visible at the left side of your screen.